package cn.bone.demo.mongo.bean;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Embedded;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * Created by MD-01 on 2016/9/26.
 */
@Entity("timeTemplate")
public class TimeTemplate {

    @Id
    private ObjectId id;

    //是否可用
    private Boolean useable;

    //创建人id
    private String createMemberId;

    //创建时间
    private Date createTime;

    //类型(0:固定时间,1:不固定时间)
    private Integer type;

    //固定时间频率
    @Embedded
    private Frequency confirm;

    //不固定时间时的频率(多少天一次)
    private Integer unConfirm;

    private LocalDateTime dateTime;

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public Boolean getUseable() {
        return useable;
    }

    public void setUseable(Boolean useable) {
        this.useable = useable;
    }

    public String getCreateMemberId() {
        return createMemberId;
    }

    public void setCreateMemberId(String createMemberId) {
        this.createMemberId = createMemberId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Frequency getConfirm() {
        return confirm;
    }

    public void setConfirm(Frequency confirm) {
        this.confirm = confirm;
    }

    public Integer getUnConfirm() {
        return unConfirm;
    }

    public void setUnConfirm(Integer unConfirm) {
        this.unConfirm = unConfirm;
    }
}
